<template>
  <div class="right-project-list-wrapper">
    <div class="label">招商项目</div>
    <div class="list">
      <RightListItem v-for="item in projectList" :key="item.id" :data-obj="item" />
    </div>
    <div class="more-btn pb-[20px]">
      <el-button class="w-full" plain size="mini" @click="handleMore">查看更多</el-button>
    </div>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
import RightListItem from '@/components/portal/project/RightListItem.vue'
import { getProjectPageList } from '@/api/park'
export default Vue.extend({
  components: { RightListItem },
  data() {
    return {
      projectList: [],
    }
  },
  head: {
    title: '',
  },
  async mounted() {
    const res = await getProjectPageList({
      pageInfo: {
        pageNum: 1,
        pageSize: 3,
      },
      sort: { 'data.sort': -1 },
    })

    this.projectList = res.list
  },
  methods: {
    handleMore() {
      this.$router.push('/project')
    },
  },
})
</script>
<style lang="scss" scoped>
.right-project-list-wrapper {
  padding: 0 20px;
  background-color: #fff;

  .label {
    color: #40445d;
    font-size: 20px;
    font-weight: bold;
    height: 60px;
    line-height: 60px;
    border-bottom: 1px solid #e0e4ed;
  }
}
</style>
